/*************************************************************************
 *  Copyright © 2023-2030 FXB CO.,LTD. All rights reserved.
 *------------------------------------------------------------------------
 *  公司：DefaultCompany
 *  项目：UPMProject
 *  文件：ScopedRegistryConfig.cs
 *  作者：Administrator
 *  日期：2024/12/27 15:28:10
 *  功能：Nothing
*************************************************************************/

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace SVNPackageManager.Runtime
{
    [System.Serializable]
    public class RegistryAddress
    {
        public string Name;
        public string URL;
    }

    [CreateAssetMenu(fileName = "ScopedRegistryConfig", menuName = "ScriptableObjects/ScopedRegistryConfig", order = 1)]
    public class ScopedRegistryConfig : ScriptableObject
    {
        public string username;
        public string password;

        public List<RegistryAddress> registrieAddress;

        //安装包的时候检出包到哪里，如果为空，那么就检出到该包同级目录
        public string checkOutPath;

        public bool ScopedRegistryVerify()
        { 
            if(!string.IsNullOrEmpty(username) && !string.IsNullOrEmpty(password) && registrieAddress.Count > 0)
                return true;
            return false;
        }
    }
}


